#include <stdio.h>

int main()
{
	FILE *file = fopen("test.txt", "r+");
	if(file == NULL)
	{
		file = fopen("test.txt", "w+");
		
		fprintf(file, "abcdefg1234567890\n#890*$#890*$#890*$#890\n*$#890*$#890*$#890*\n$#890*$#890*$#890*\n$#890*$#890*$#890*$\n#890*$#890*$#890*$#\n890*$#890*$#890*$\n#890*$#890*$#890\n*$#890*$#890*$#890*$#8\n90*$#890*$#890*$#89\n0*$#890*$#890*$#890\n*$#890*$#890*$#890*\n$#890*$#890*$#890*\n$#890*$#890*$#890*$\n#890*$#890*$#890*$#890*$\n#890*$#890*$#890*$#8\n90*$#890*$#890*$#890*$\n#890*$#890*$#890*$#8\n90*$#890*$#890*$#890*$#890*$\n#890*$#890*$#890*$#8\n90*$#890*$#890*$#890*$\n#890*$#890*$#890*$#89\n0*$#890*$#890*$#890*$\n#890*$#890*$#890*$#\n890*$#890*$#890*$#890*\n$#890*$#890*$#890\n*$#890*$#890*$#");
	}
	
	char a[20];

	fgets(a, 20, file);
	char c;
	rewind(file);
	while((c = fgetc(file)) != EOF)
	{
		putchar(c);
	}
	fclose(file);
	printf("%s", a);
	return 0;
}
